﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<DHAA.Areas.Administrator.Models.ProductModels>" %>

    <fieldset style="width: 640px">
        <legend>Products Details</legend>
        <div style="float: right;margin-right: 10px">
         
        <div class="display-field">      
        <div id="preview">
       <% if (Html.DisplayTextFor(model=>model.ProductImage).ToString() != "")
{
    %>
        <img src="<%=ResolveUrl("~/Default/Imagesproduct/")%><%= Html.DisplayTextFor(model=>model.ProductImage) %>" alt="<%=Model.CategoryName %>"/>
    <%
}else{ %>
<img src="<%=ResolveUrl("~/Content/images/")%>noImage.jpg" alt="No image"/>


<%} %>
 </div>  
        
        
        </div>
        </div>
        <div class="display-label">ID :</div>
        <div class="display-field"><%= Html.Encode(Model.ProductID) %></div>
        <br/>
        <div class="display-label">Product's Name :</div>
        <div class="display-field" style="font-size: 1.3em; color: navy; font-weight:bold"><%= Html.Encode(Model.ProductName) %></div>
        <br/>
             <div class="display-label">Price :</div>
        <div class="display-field" style="font-size: 1.3em; color:Olive"><%= Html.Encode(String.Format("{0:F}", Model.Price)) %></div>
        <br/>
        <div class="display-label">Category :</div>
        <div class="display-field"><%= Html.Encode(Model.CategoryName) %></div>
        <div class="cleared"></div>
        <div class="display-label">Description :</div>
        <div class="cleared-top-5"></div>
        <div class="display-field"><%= Model.Description %></div>
        <div class="cleared"></div>
    </fieldset>
    <p>
        <%= Html.ActionLink("Edit", "Edit", new { id=Model.ProductID}) %> |
        <%= Html.ActionLink("Back to List", "Index") %>
    </p>


